<template>
  <div class="app">
    <el-config-provider :locale="zhCn">
      <router-view></router-view>
    </el-config-provider>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue"
// 国际化处理
import { ElConfigProvider } from "element-plus"
import zhCn from "element-plus/dist/locale/zh-cn"
// import { mainStore } from "@/stores/modules/main"
// import { setDynamicRoute } from "@/utils/setDynamicRoute"

export default defineComponent({
  components: {
    ElConfigProvider
  },
  setup() {
    // const mainstore = mainStore()
    // // 如果已登录，刷新页面获取最新权限
    // if (localStorage.getItem("token")) {
    //   // 初始化菜单和按钮权限
    //   mainstore.getInit()
    //   // 设置动态路由
    //   setDynamicRoute(mainstore.menuList)
    // }
    return {
      zhCn
    }
  }
})
</script>

<style scoped lang="less">
.app {
  height: 100%;
}
</style>
